package cate.game.pvp.gradepvp.msg;

import cate.game.client.msg.ClientMsg;
import cate.game.client.msg.MsgConfig;
import cate.game.client.msg.MsgOutput;
import cate.game.client.msg.id.MsgIdBGradePvp;
import cate.game.role.Role;
import cate.game.role.pvp.gradepvp.GradePvpRecord;
import easy.java.dev.note.NoteField;

import java.util.List;

@ClientMsg(title = "录像列表返回")
public class GradePvpRecordResp implements MsgOutput {
    @NoteField(value = "录像列表数据")
    public List<GradePvpRecord> records;

    public GradePvpRecordResp() {

    }

    public GradePvpRecordResp(Role role, int type) {
        if (type == 1) {
            records = role.getPvp().gradePvp.records;
        } else {
            records = role.getGame().pvp.gradePvp.loadNewBeeRecords();
        }
    }

    @Override
    public MsgConfig conf() {
        return MsgIdBGradePvp.RECORD_RESP;
    }
}
